package com.shareyi.baseproject.kernel.common.spi;

import com.shareyi.baseproject.kernel.common.spi.sequence.SequenceProvider;
import lombok.Getter;
import lombok.Setter;

/**
 * spi单例持有者，方便直接获取spi工具
 *
 * @author david
 * @date 2021-08-31
 */
@Getter
@Setter
public class SpiHolder {

    /**
     * 单例对象
     */
    private static final SpiHolder INSTANCE = new SpiHolder();

    /**
     * 获取单例
     *
     * @return
     */
    public static SpiHolder getInstance() {
        return INSTANCE;
    }

    /**
     * 对象序列化工具
     */
    private ObjectSerialization objectSerialization;

    /**
     * Long型序列号生成器
     */
    private SequenceProvider<Long> longSequenceProvider;
}
